{-# LANGUAGE EmptyDataDecls #-}
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE GADTs #-}
{-# LANGUAGE KindSignatures #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TemplateHaskell #-}
{-# LANGUAGE TypeFamilies #-}
module Generics.MultiRec.Language.XML where

import Generics.MultiRec
import Generics.MultiRec.TH.Alt

import Text.XML.HaXml.Types
import Text.XML.HaXml.Posn

data XML :: (* -> *) where
  TheProlog :: XML Prolog
  TheEntityDefSymTab :: XML (SymTab EntityDef)
  TheMiscList :: XML [Misc]
  TheXMLDeclMaybe :: XML (Maybe XMLDecl)
  TheDocTypeDeclMaybe :: XML (Maybe DocTypeDecl)
  TheEncodingDeclMaybe :: XML (Maybe EncodingDecl)
  TheSDDeclMaybe :: XML (Maybe Bool)
  TheProcessingInstruction :: XML ProcessingInstruction
  TheExternalIDMaybe :: XML (Maybe ExternalID)
  TheMarkupDeclList :: XML [MarkupDecl]
  TheElementDecl :: XML ElementDecl
  TheAttListDecl :: XML AttListDecl
  TheEntityDecl :: XML EntityDecl
  TheNotationDecl :: XML NotationDecl
  TheMisc :: XML Misc
  TheTextDeclMaybe :: XML (Maybe TextDecl)
  TheExtSubsetDeclList :: XML [ExtSubsetDecl]
  TheMarkupDecl :: XML MarkupDecl
  TheConditionalSect :: XML ConditionalSect
  TheAttributeList :: XML [Attribute]
  TheBool :: XML Bool
  TheReference :: XML Reference
  TheContentSpec :: XML ContentSpec
  TheMixed :: XML Mixed
  TheCP :: XML CP
  TheModifier :: XML Modifier
  TheCPList :: XML [CP]
  TheAttDefList :: XML [AttDef]
  TheAttType :: XML AttType
  TheDefaultDecl :: XML DefaultDecl
  TheTokenizedType :: XML TokenizedType
  TheEnumeratedType :: XML EnumeratedType
  TheEnumeration :: XML Enumeration
  TheAttValue :: XML AttValue
  TheFIXEDMaybe :: XML (Maybe FIXED)
  TheIncludeSect :: XML IncludeSect
  TheIgnoreSect :: XML IgnoreSect
  TheIgnore :: XML Ignore
  TheEntityRef :: XML EntityRef
  TheGEDecl :: XML GEDecl
  ThePEDecl :: XML PEDecl
  TheEntityDef :: XML EntityDef
  ThePEDef :: XML PEDef
  TheEntityValue :: XML EntityValue
  TheExternalID :: XML ExternalID
  TheNDataDeclMaybe :: XML (Maybe NDataDecl)
  TheSystemLiteral :: XML SystemLiteral
  ThePubidLiteral :: XML PubidLiteral
  TheEncodingDecl :: XML EncodingDecl
  TheEVList :: XML [EV]
  TheDocument :: XML (Document Posn)
  TheXMLDecl :: XML XMLDecl
  TheDocTypeDecl :: XML DocTypeDecl
  TheExtSubset :: XML ExtSubset
  TheExtSubsetDecl :: XML ExtSubsetDecl
  TheElement :: XML (Element Posn)
  TheElemTag :: XML ElemTag
  TheContent :: XML (Content Posn)
  TheContentList :: XML ([] (Content Posn))
  TheAttDef :: XML AttDef
  TheFIXED :: XML FIXED
  TheIgnoreSectContents :: XML IgnoreSectContents
  TheNDataDecl :: XML NDataDecl
  TheTextDecl :: XML TextDecl
  TheExtParsedEnt :: XML (ExtParsedEnt Posn)
  TheExtPE :: XML ExtPE
  ThePublicID :: XML PublicID
  TheEV :: XML EV
  TheName :: XML Name
  TheAttPair :: XML ((,) Name AttValue)

$(deriveEverything
  (DerivOptions
    [ ( [t| Prolog |] ,"TheProlog")
    , ( [t| (SymTab EntityDef) |] ,"TheEntityDefSymTab")
    , ( [t| [Misc] |] ,"TheMiscList")
    , ( [t| (Maybe XMLDecl) |] ,"TheXMLDeclMaybe")
    , ( [t| (Maybe DocTypeDecl) |] ,"TheDocTypeDeclMaybe")
    , ( [t| (Maybe EncodingDecl) |] ,"TheEncodingDeclMaybe")
    , ( [t| (Maybe SDDecl) |] ,"TheSDDeclMaybe")
    , ( [t| ProcessingInstruction |] ,"TheProcessingInstruction")
    , ( [t| (Maybe ExternalID) |] ,"TheExternalIDMaybe")
    , ( [t| [MarkupDecl] |] ,"TheMarkupDeclList")
    , ( [t| ElementDecl |] ,"TheElementDecl")
    , ( [t| AttListDecl |] ,"TheAttListDecl")
    , ( [t| EntityDecl |] ,"TheEntityDecl")
    , ( [t| NotationDecl |] ,"TheNotationDecl")
    , ( [t| Misc |] ,"TheMisc")
    , ( [t| (Maybe TextDecl) |] ,"TheTextDeclMaybe")
    , ( [t| [ExtSubsetDecl] |] ,"TheExtSubsetDeclList")
    , ( [t| MarkupDecl |] ,"TheMarkupDecl")
    , ( [t| ConditionalSect |] ,"TheConditionalSect")
    , ( [t| [Attribute] |] ,"TheAttributeList")
    , ( [t| Bool |] ,"TheBool")
    , ( [t| Reference |] ,"TheReference")
    , ( [t| ContentSpec |] ,"TheContentSpec")
    , ( [t| Mixed |] ,"TheMixed")
    , ( [t| CP |] ,"TheCP")
    , ( [t| Modifier |] ,"TheModifier")
    , ( [t| [CP] |] ,"TheCPList")
    , ( [t| [AttDef] |] ,"TheAttDefList")
    , ( [t| AttType |] ,"TheAttType")
    , ( [t| DefaultDecl |] ,"TheDefaultDecl")
    , ( [t| TokenizedType |] ,"TheTokenizedType")
    , ( [t| EnumeratedType |] ,"TheEnumeratedType")
    , ( [t| Enumeration |] ,"TheEnumeration")
    , ( [t| AttValue |] ,"TheAttValue")
    , ( [t| (Maybe FIXED) |] ,"TheFIXEDMaybe")
    , ( [t| IgnoreSect |] ,"TheIgnoreSect")
    , ( [t| Ignore |] ,"TheIgnore")
    , ( [t| GEDecl |] ,"TheGEDecl")
    , ( [t| PEDecl |] ,"ThePEDecl")
    , ( [t| EntityDef |] ,"TheEntityDef")
    , ( [t| PEDef |] ,"ThePEDef")
    , ( [t| EntityValue |] ,"TheEntityValue")
    , ( [t| ExternalID |] ,"TheExternalID")
    , ( [t| (Maybe NDataDecl) |] ,"TheNDataDeclMaybe")
    , ( [t| SystemLiteral |] ,"TheSystemLiteral")
    , ( [t| PubidLiteral |] ,"ThePubidLiteral")
    , ( [t| EncodingDecl |] ,"TheEncodingDecl")
    , ( [t| [EV] |] ,"TheEVList")
    , ( [t| Document Posn|] ,"TheDocument")
    , ( [t| XMLDecl |] ,"TheXMLDecl")
    , ( [t| DocTypeDecl |] ,"TheDocTypeDecl")
    , ( [t| ExtSubset |] ,"TheExtSubset")
    , ( [t| ExtSubsetDecl |] ,"TheExtSubsetDecl")
    , ( [t| Element Posn |] ,"TheElement")
    , ( [t| ElemTag |] ,"TheElemTag")
    , ( [t| Content Posn |] ,"TheContent")
    , ( [t| [Content Posn] |] ,"TheContentList")
    , ( [t| AttDef |] ,"TheAttDef")
    , ( [t| FIXED |] ,"TheFIXED")
    , ( [t| IgnoreSectContents |] ,"TheIgnoreSectContents")
    , ( [t| NDataDecl |] ,"TheNDataDecl")
    , ( [t| TextDecl |] ,"TheTextDecl")
    , ( [t| ExtParsedEnt Posn|] ,"TheExtParsedEnt")
    , ( [t| ExtPE |] ,"TheExtPE")
    , ( [t| PublicID |] ,"ThePublicID")
    , ( [t| EV |] ,"TheEV")
    , ( [t| Name |] ,"TheName")
    , ( [t| (,) Name AttValue|] ,"TheAttPair")
   ]
   "XML"
   (\t c -> "CONSTRUCTOR_" ++ t ++ "_" ++ c)
   "XMLPF"
   True
   Balanced
  )
 )


instance Show AttDef where
  show = const "??"

instance Show AttListDecl where
  show = const "??"

instance Show AttType where
  show = const "??"

instance Show ConditionalSect where
  show = const "??"

instance Show (Content Posn) where
  show = const "??"

instance Show ContentSpec where
  show = const "??"

instance Show DefaultDecl where
  show = const "??"

instance Show DocTypeDecl where
  show = const "??"

instance Show (Document Posn) where
  show = const "??"

instance Show ElemTag where
  show = const "??"

instance Show (Element Posn) where
  show = const "??"

instance Show ElementDecl where
  show = const "??"

instance Show EncodingDecl where
  show = const "??"

instance Show EntityDecl where
  show = const "??"

instance Show EntityDef where
  show = const "??"

instance Show EnumeratedType where
  show = const "??"

instance Show ExtPE where
  show = const "??"

instance Show (ExtParsedEnt Posn) where
  show = const "??"

instance Show ExtSubset where
  show = const "??"

instance Show ExtSubsetDecl where
  show = const "??"

instance Show FIXED where
  show = const "??"

instance Show GEDecl where
  show = const "??"

instance Show Ignore where
  show = const "??"

instance Show IgnoreSectContents where
  show = const "??"

instance Show MarkupDecl where
  show = const "??"

instance Show Misc where
  show = const "??"

instance Show Mixed where
  show = const "??"

instance Show NDataDecl where
  show = const "??"

instance Show PublicID where
  show = const "??"

instance Show NotationDecl where
  show = const "??"

instance Show PEDecl where
  show = const "??"

instance Show Prolog where
  show = const "??"

instance Show TextDecl where
  show = const "??"

instance Show TokenizedType where
  show = const "??"

instance Show XMLDecl where
  show = const "??"






type instance PF XML = XMLPF

